package cn.com.shaom.learning.sb.mq.jms.example2;

import org.springframework.jms.core.JmsTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * ClassName: SimpleSenderImpl
 * Description:
 * Date: 2017/12/29 10:19 【需求编号】
 *
 * @author Shaom
 * @version V1.0.0
 */
@Component
public class SimpleSender{
    @Resource
    private JmsTemplate jmsTemplate;

    public void send(Msg msg) {
        // 使用  MessageConverter 以后不能使用 send()方法
        jmsTemplate.convertAndSend("leainingSpringBoot2", msg);
    }
}
